// LogSystem.h: interface for the LogSystem class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LOGSYSTEM_H__60D3DE92_E886_4D47_828F_04F1F2BE07BC__INCLUDED_)
#define AFX_LOGSYSTEM_H__60D3DE92_E886_4D47_828F_04F1F2BE07BC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "LSHCommon.h"

LSH_NAMESPACE_BEGIN

class System;

enum {
    LOGSYS_CHANNEL_LOGSYS       = 0x0001,
    LOGSYS_CHANNEL_ERRORSYS     = 0x0002,
    LOGSYS_CHANNEL_TIMESYS      = 0x0004,
	LOGSYS_CHANNEL_FACTORYSYS   = 0x0008,
	LOGSYS_CHANNEL_RESOURCESYS  = 0x0010,
	LOGSYS_CHANNEL_TASKSYS      = 0x0020,
	LOGSYS_CHANNEL_WINDOWSYS    = 0x0040,
	LOGSYS_CHANNEL_FRAMESYS     = 0x0080,
	LOGSYS_CHANNEL_INPUTSYS     = 0x0100,
	LOGSYS_CHANNEL_VISUALSYS    = 0x0200,
	LOGSYS_CHANNEL_AUDIOSYS     = 0x0400,
	LOGSYS_CHANNEL_NETWORKSYS   = 0x0800,
	LOGSYS_CHANNEL_TASK         = 0x1000,
	LOGSYS_CHANNEL_LOGICLAYER   = 0x2000,
	LOGSYS_CHANNEL_AVLAYER      = 0x4000,
};

enum {
    LOGSYS_DETAIL_ERROR,
    LOGSYS_DETAIL_LOW,
    LOGSYS_DETAIL_MED1,
    LOGSYS_DETAIL_MED2,
    LOGSYS_DETAIL_MED3,
    LOGSYS_DETAIL_HIGH,
};

enum {
    LOGSYS_OUTPUTMODE_NONE,
    LOGSYS_OUTPUTMODE_WIN32CONSOLE,
    LOGSYS_OUTPUTMODE_FILE,
};

class LogSystem{
public:
    LogSystem();
    virtual( ~LogSystem() );
public:
    virtual bool Init(System* pSystem) = 0;
    virtual bool Shutdown() = 0;
public:
	virtual void SetOutputMode(int nOutputMode) = 0;
	virtual int OutputMode() = 0;
	virtual void SetChannelMask(int nChannelMask) = 0;
	virtual int ChannelMask() = 0;
	virtual void SetDetailLevel(int nDetailLevel) = 0;
	virtual int DetailLevel() = 0;
public:
	virtual void WriteOutput(int nChannelMask, int nDetailLevel, char* pFormat, ...) = 0;
};

LSH_NAMESPACE_END

#endif // !defined(AFX_LOGSYSTEM_H__60D3DE92_E886_4D47_828F_04F1F2BE07BC__INCLUDED_)
